package com.topnet.leaderhelp.utils.xfyun.msc.ui;

import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import com.iflytek.cloud.msc.util.log.DebugLog;

/**
 * @Description: java类作用描述
 * @Author: 下雨了
 * @CreateDate: 2022-03-03 15:26
 * @UpdateUser: 更新者
 * @UpdateDate: 2022-03-03 15:26
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
public class DLinearLayout extends LinearLayout {

    private CDialog.CCallBack callBack = null;
    protected boolean b = true;
    protected boolean c = true;

    public DLinearLayout(Context context) {
        super(context);
    }

    protected static boolean a(ViewGroup viewGroup) {
        try {
            int var6 = viewGroup.getChildCount();
            for (int i = 0; i < var6; ++i) {
                try {
                    View var7 = viewGroup.getChildAt(i);
                    var7.setOnClickListener((OnClickListener) null);
                    var7.setBackgroundDrawable((Drawable) null);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
            viewGroup.removeAllViews();
            viewGroup.setOnClickListener((OnClickListener) null);
            viewGroup.setBackgroundDrawable((Drawable) null);
            return true;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return false;
    }

    protected void d() {
        Intent intent = new Intent();
        if (Build.VERSION.SDK_INT > 10) {
            intent.setAction("android.settings.SETTINGS");
        } else {
            intent.setAction("android.settings.WIRELESS_SETTINGS");
        }
        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        this.getContext().startActivity(intent);
    }

    public void setExitCallBack(CDialog.CCallBack back) {
        this.callBack = back;
    }

    public void c() {
        CDialog.CCallBack var1;
        if ((var1 = this.callBack) != null) {
            var1.callBack();
        }

    }

    protected void e() {
    }

    protected void a() {
    }

    protected boolean b() {
        try {
            a(this);
        } catch (Exception var1) {
            DebugLog.LogE(var1);
            return false;
        }

        return true;
    }
}
